<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="../../org/angular.min.js"></script>
</head>

<body ng-app="app" ng-controller="ctrl">
    <div id="box"></div>
    <script>
        var m = angular.module('app', []);
        m.controller('ctrl', ['$scope', function($scope) {
            console.log('是否为数组：' + angular.isArray([]));
            console.log('是否为日期：' + angular.isDate(new Date()));
            var b;
            console.log('是否defined：' + angular.isDefined(b));
            console.log('是否undefined：' + angular.isUndefined(b));

            function a() {}
            console.log('是否函数：' + angular.isFunction(a));
            console.log('是否数字：' + angular.isNumber(9));
            console.log('是否字符串：' + angular.isFunction('123'));
            var obj = {};
            console.log('是否对象：' + angular.isObject(obj));
            // var e = '';
            var e = document.getElementById('box');
            console.log('是否是元素标签：' + angular.isElement(e));
            //----比较数据是否相当
            var obj1 = {
                name: 'zyx',
            };
            var obj2 = {
                name: 'yu',
            };
            console.log(angular.equals(obj1, obj2));
        }])
    </script>
</body>

</html>
